package com.atlyc.common.config.cors;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author lyc
 * @date 2018/7/20
 */
@Configuration
public class ConfigurationFilter {

    @Bean
	public FilterRegistrationBean registerFilter() {

		FilterRegistrationBean bean = new FilterRegistrationBean();

		bean.addUrlPatterns("/*");
		bean.setFilter(new CrosFilter());

		return bean ;
	}


}
